Object.defineProperty(exports, "__esModule", {
    value: !0
}), exports.default = void 0;

var e = requirePlugin("live-player-plugin"), o = getApp(), t = Behavior({
    behaviors: [],
    properties: {},
    data: {
        openid: ""
    },
    attached: function() {},
    methods: {
        getOpenid: function(t) {
            var i = this;
            return new Promise(function(n, a) {
                var p = o.globalData.openid;
                p ? n(p) : e.getOpenid({
                    room_id: t
                }).then(function(e) {
                    o.globalData.openid = e.openid, i.setData({
                        openid: e.openid
                    }), n(e.openid);
                }).catch(function(e) {
                    a(), console.log("get openid", e);
                });
            });
        }
    }
});

exports.default = t;